package com.bbs.beans;


import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import im.beans.User;



// 对某话题发表帖子

@Entity
@Table(name="t_BBS_Submit")
public class Submit {
	//Long subjectId;
	long id;
	// 帖子发表的主题
	Subject subject;
	// 发帖的用户
	User user;
	// 发表的时间
	String time;
	String title;
	String content;
	// 回复的数目
	int commitbackcount;
	// 帖子被回复后的时间变化
	String changeTime;
	
	@Id
	@GeneratedValue
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="subject_id")
	public Subject getSubject() {
		return subject;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	
	@ManyToOne
	@JoinColumn(name="user_id")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public int getCommitbackcount(){
		return commitbackcount;
	}
	public void setCommitbackcount(int a){
		this.commitbackcount=a;
	}
	public String getChangeTime() {
		return changeTime;
	}
	public void setChangeTime(String changeTime) {
		this.changeTime = changeTime;
	}
	
	

}
